<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
    />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>3D翻转卡片</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        perspective: 1000px;
      }

      .card-wrapper {
        width: 300px;
        height: 400px;
        position: relative;
        transform-style: preserve-3d;
        transition: transform 0.6s;
        cursor: pointer;
      }

      .card-wrapper:hover {
        transform: rotateY(180deg);
      }

      .card-front,
      .card-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 30px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      }

      .card-front {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
      }

      .card-back {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        transform: rotateY(180deg);
      }

      .card-icon {
        font-size: 80px;
        margin-bottom: 20px;
      }

      .card-title {
        font-size: 28px;
        font-weight: bold;
        margin-bottom: 15px;
      }

      .card-description {
        font-size: 16px;
        text-align: center;
        line-height: 1.6;
        opacity: 0.9;
      }
    </style>
  </head>
  <body>
    <div class="card-wrapper">
      <div class="card-front">
        <div class="card-icon">🎴</div>
        <div class="card-title">正面</div>
        <div class="card-description">悬停查看背面</div>
      </div>
      <div class="card-back">
        <div class="card-icon">🔄</div>
        <div class="card-title">背面</div>
        <div class="card-description">3D翻转效果，使用CSS transform实现</div>
      </div>
    </div>
  </body>
</html>

